package server.business.play;

import java.util.Collection;

import server.ServerEngin;
import server.ServerTransportProxy;
import server.commonData.User;
import server.messageId.S2CMessageId;
import server.msgBean.LoginMessage.RoomInfoList;

import com.core.initialize.Message;

/**
 * 打牌发送消息接口
 * @author King
 *
 */
public class PlayTransport
{
	
	/**踢回房间列表**/
	public static void kickToRoomList(Collection<User> list)
	{
		Message msg = Message.newMessage();
		msg.setModuleAction(S2CMessageId.PLAY.MODULE_ID, S2CMessageId.PLAY.KICK_TO_ROOMLIST_RES);
		
		RoomInfoList.Builder roomBuilder = RoomInfoList.newBuilder();
		ServerEngin.getInstance().getCache().getRoomManager().showRoomInfo(roomBuilder);
		
		msg.setBody(roomBuilder);
		ServerTransportProxy.sendMsgByUser(msg, list);
	}

}
